<?php
$arguments['title'] = "维修记录";
$arguments['location'] = array(
    "首页",
    "故障维修记录",
    "维修记录",
);
$arguments['css'] = array(
    PUBLIC_LIB.'js/core/Pagination/kkpager_orange.css',
    PUBLIC_LIB.'fonts/hui_iconfont/iconfont.css',
    PUBLIC_LIB.'css/biz/enhanced.css',
    PUBLIC_LIB.'js/core/Dropdownlist/chosen.css',
    PUBLIC_LIB.'js/jquery/jquery-ui-1.11.4.custom/jquery-ui.css',
    PUBLIC_LIB.'js/core/fancybox/jquery.fancybox-1.3.4.css',
);
$arguments['js'] = array(
    PUBLIC_LIB.'js/core/fancybox/jquery-1.7.1.js',
    PUBLIC_LIB.'js/core/Pagination/kkpager.min.js',
    PUBLIC_LIB.'js/core/DatePicker/WdatePicker.js',
    PUBLIC_LIB.'js/biz/custominput.js', 
    PUBLIC_LIB.'js/core/Dropdownlist/chosen.jquery.js',  
    PUBLIC_LIB.'js/biz/pagelist.js',
    PUBLIC_LIB.'js/core/Tooltip/tooltip.js',
    PUBLIC_LIB.'js/jquery/jquery-ui-1.11.4.custom/jquery-ui.js',
    PUBLIC_LIB.'js/ajaxupload/ajaxfileupload.js',
    PUBLIC_LIB.'js/core/fancybox/jquery.fancybox-1.3.4.js',
    PUBLIC_LIB.'js/core/fancybox/jquery.fancybox-1.3.4.pack.js',
    PUBLIC_LIB.'js/biz/ajaxfun.js',
    PUBLIC_LIB.'js/biz/maintenanceList.js',     
);
importHeader($arguments);
?>
<div class="formtitle"><span>维修记录</span></div>
    <div class="search">
     <FORM id="form" method="post" enctype="multipart/form-data">
        <p>
            <div class="label_title">
                <label for="car_num">设备编号：</label>
            </div>
            <div class="search_text">
                <input  type="text" class="dfinput search_width" id="car_num" name="car_num" value=""/>
            </div>
            <div class="label_title">
                    <label for="approval_person">维修状态：</label>
                </div>
                <div class="search_text">
                    <select class="dfinput search_width" id="approval_person" name="approval_person">
                            <option value="">全部</option>
                            <option value="0">已报修</option>
                            <option value="1">已取消</option>
                            <option value="2">已修好</option>
                            <option value="3">已报废</option>
                    </select>
                </div> 
            <div class="label_title">
                <label for="repairs_man">报修人员:</label>
            </div>
            <div class="search_text">
                <input  type="text" class="dfinput search_width" id="repairs_man" name="repairs_man" value=""/>
            </div>
            <button type="button" class="tool tool_left" id="search"><i class="Hui-iconfont">&#xe683;</i>查询</button>
            <div class="tool tool_btn" id="addMaintenance"><i class="Hui-iconfont">&#xe600;</i>报修</div>
        </p>
        <p>
            <div class="label_title" style="width: 110px; margin-left:-9px;">
                <label for="date" class="label_checkbox">报修时间：</label>  
            </div>
            <div class="search_text" style="margin-left:-6px;">
                <input  type="text" class="dfinput search_width" id="date_start" name="date_start" onClick="WdatePicker()" value=""/>
            </div>  
            <div class="label_title">
                <label>至：</label>
            </div>
            <div class="search_text">
                <input  type="text" class="dfinput search_width" id="date_end" name="date_end" onClick="WdatePicker()" value=""/>
            </div> 
            <div class="label_title">
                <label for="service_man">维修人员:</label>
            </div>
            <div class="search_text">
                <input  type="text" class="dfinput search_width" id="service_man" name="service_man" value=""/>
            </div>  
        </p>

       </FORM>     
    </div>
    <div class="table_box tablelist">
        <table width="140%">
            <tr>
                <th width="9%">设备编号</th>
                <th width="9%">设备类别</th>
                <th width="9%">设备型号</th>
                <th width="9%">报修人员</th>
                <th width="10%">报修时间</th>
                <th width="15%">故障描述</th>
                <th width="9%">维修人员</th>
                <th width="10%">维修时间</th>
                <th width="9%">维修状态</th>
                <th width="11%">操作</th>
            </tr>
        </table>
        <table width="140%">
            <tr>
                <td width="9%">xxll0090</td>
                <td width="9%">AGV</td>
                <td width="9%">AGV</td>
                <td width="9%">lia</td>
                <td width="10%">2016.3.3</td>
                <td width="15%">线路故障</td>
                <td width="9%">lia</td>
                <td width="10%">2016.03.04</td>
                <td width="9%">已报修</td>
                <td width="11%">
                    <a href=""><div class="tools tool_left" id="detail"><i class="Hui-iconfont">&#xe695;</i>详情</div></a>
                    <a href=""><div class="tools tool_left" id="maintenanceEdit"><i class="Hui-iconfont">&#xe60c;</i>编辑</div></a>
                    <a href="javascript:maintenanceDelete();"><div class="tools tool_left"><i class="Hui-iconfont">&#xe609;</i>删除</div></a>
                </td>
            </tr>
            <?php
                if(isset($carList) && !empty($carList->list) && count($carList->list)>0){
                    foreach($carList->list as $car){
                        echo '<tr>
                            <td width="10%">',$car->vin,'</td>  
                            <td width="10%">',$car->state,'</td>  
                            <td width="10%">',$car->invoiceStatus==1?'已开票':'未开票','</td> 
                            <td width="5%">',$car->type,'</td> 
                            <td width="10%">',$car->ein,'</td> 
                            <td width="5%">',$car->color,'</td> 
                            <td width="5%">',$car->hubNum,'</td> 
                            <td width="10%">',$car->fuelType,'</td> 
                            <td width="5%">',$car->dpm,'</td>
                            <td width="5%">',$car->seatNum,'</td>    
                            <td width="30%">
                        <a href="#" onClick="lookDetail(\'',$car->vehicleId,'\');"><div class="tools tool_left"><i class="Hui-iconfont">&#xe695;</i>查看详情</div></a>
                    <a href="#" onClick="vehicleEdit(\'',$car->vehicleId,'\');"><div class="tools tool_left"><i class="Hui-iconfont">&#xe60c;</i>编辑</div></a>
                    <a href="#" onClick="deleteVehicle(\'',$car->vehicleId,'\',\'',$car->vin,'\')"><div class="tools tool_left"><i class="Hui-iconfont">&#xe609;</i>删除</div></a>';
                    
                            echo '</ul></div></div></td></tr>';
                    }
                }else{
                    echo '<tr><td colspan="10">',isset($noAuth)?$noAuth:"",'没有查询到任何维修记录</td></tr>';
                }
            ?>
            
        </table>
    </div>
     <div class="pager" id="kkpager" data-total="<?php 
        if (empty($carList->list))
        {
            echo 1;
        }
        else 
        {
            echo $carList->page; 
        }
        ?>"></div>
<?php importFooter();?>